package org.dromara.merchants.domain.bo;

import org.dromara.merchants.domain.TaGoods;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.util.List;

/**
 * 商品业务对象 ta_goods
 *
 * @author xiyin321
 * @date 2024-07-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TaGoods.class, reverseConvertGenerate = false)
public class TaGoodsBo extends BaseEntity {

    /**
     * 商品编号
     */
    @NotNull(message = "商品编号不能为空", groups = {EditGroup.class})
    private Long goodsId;

    /**
     * 所属店铺id
     */
    @NotNull(message = "所属店铺id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long storeId;

    /**
     * 所属店铺分类id
     */
    @NotNull(message = "特色分类不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long classificationId;

    /**
     * 所属分类id
     */
    private Long categoryId;

    /**
     * 商品名
     */
    @NotBlank(message = "商品名不能为空", groups = {AddGroup.class, EditGroup.class})
    private String goodsName;

    /**
     * 价格
     */
    @NotBlank(message = "价格不能为空", groups = {AddGroup.class, EditGroup.class})
    private String price;

    /**
     * 关联列表
     */
    private List<TaAssociationBo> associationList;

    /**
     * 描述
     */
    private String description;

    /**
     * 商品图标url
     */
    private String image;

    /**
     * 是否上架
     */
    private String isStatus;



}
